{#{% extends "bootstrap/base.html" %}#}
{% extends "_base_base.html" %}

{% block title %}{{ title }} - socialcredits{% endblock %}

{% block head %}
    {{ super() }}
    <link rel="icon" href="{{ url_for('static', filename='imgs/icon.png') }}" type="image/x-icon">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}"/>
{% endblock %}

{% block navbar %}
    <div class="navbar navbar-default" role="navigation">
        <nav class="navbar navbar-default navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand" href="{{ url_for('web.index') }}">Lawyer Asst</a>
                </div>
                <div id="navbar" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        {% block navi %}{% endblock %}
                    </ul>
                {% if current_user.username %}
                    <form class="navbar-form navbar-right" method="POST" action="">
                        <div class="form-group">
                            <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                <a href="{{ url_for('web.me') }}">{{ current_user.username }}</a>
{#                                <a href="/">{{ current_user.username }}</a>#}
                        </div> |
                        <button class="btn btn-default">
                            <a href="{{ url_for('auth.logout') }}">退出</a>
                        </button>
                    </form>
                {%  endif %}
                </div>
            </div>
        </nav>
    </div>
{% endblock %}

{% block content %}
    <div class="container">
        <div class="row">
            {% for message in get_flashed_messages() %}
                <div class="alert alert-warning col-xs-12">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    {{ message }}
                </div>
            {% endfor %}
            {% block page_content %}{% endblock %}
        </div>
    </div>
    {% include '_footer.html' %}
{% endblock %}

{% block scripts %}
    {{ super() }}
    <script type="text/javascript" src="{{ url_for('static', filename='js/index.js') }}"></script>
{% endblock %}
